<html>
    <head>
        <title>发表帖子</title>
        <link rel="stylesheet" href="/static/css/browse.css" type="text/css" />
    </head>
    <body>
        <div class="wrapper">
            <div id="addArticle">
                <div class="head"> <span>发布帖子</span> </div>

                <form method="POST" action="/market/add/">
                    {% csrf_token %}


                    <div class="p-line">
                        <label class="title"><span style="color:red;">*</span>分类:</label>
                        {{form.gtype}}
                    </div>

                    <div class="p-line">
                        <label class="title"><span style="color:red;">*</span>标题:</label>
                        {{form.title}}
                    </div>

                    <div class="p-line">
                        <label class="title"><span style="color:red;">*</span>成色:</label>
                        {{form.pct}}
                    </div>

                    <div class="p-line">
                        <label class="title"><span style="color:red;">*</span>价格:</label>
                        {{form.price}}
                    </div>

                    <div class="p-line">
                        <label class="title"><span style="color:red;">*</span>描述:</label>
                        {{form.desc}}
                    </div>

                    <div class="p-line">
                        <label class="title"><span style="color:red;">*</span>联系电话:</label>
                        {{form.phone}}
                    </div>


                    <div id="show"></div>
                    <div id="hidevar"></div>
                    <input class="btnSubmit"  type="submit" value="发表帖子" />
                </form>

                <iframe id="preview" name="preview" style="display:none;"></iframe>
                <form method="POST" action="/market/upload/" target="preview" enctype="multipart/form-data">
                    {% csrf_token %}
                    {{imgform.as_p}}
                    <input type="submit" value="upload" />
                </form>

            </div>
        </div>

    </body>
</html>

